#include <iostream>
#include <cstdlib>
#include "../lexcal.h"

using namespace std;

int main()
{

	//string attr = ".other";
	//string attr = "1.other";
	//string attr = "123.other";
	//string attr = "123other.bbb.ccc.ddd.e.";
	string attr="2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2127, 2128, 2130, 2134, 2135, 2136, 2137, 2151, 2152, 2153, 2154, 2155, 2156, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2168, 2169, 2170, 2171, 2183, 2185, 2186, 2187, 2189, 2194, 2196, 2197, 2199, 2202, 2206, 2207, 2208, 2209, 2210, 2212, 2213, 2214, 2215, 2219, 2241, 2242, 2243, 2244, 2246, 2248, 4101, 4102, 6101, 6105, 6106";
	//string attr = "1234567890.other";
	//string attr = "1234567890.other";
	//string b  = "  1234567890.other  ";

	cout <<attr<<endl;
	cout<<std::endl;

	while(attr.size() != 0)
	{
		string id = cell(attr,',');
		cout<<id<<" ";
	}
	cout<<std::endl;
	cout<<std::endl;

	//string  c= "123";
	//int d= atoi(c.c_str());
	//cout<<std::endl;
//cout<<d<<endl;

string nn="6001,35,M,S,702,?,0,0,3,2318,2102,2102,0,1,507,2,1,0,0,cs,co,0,7,0,7,10816,0,51,0.11,2487,0,0,3,0,0,12,62,12,1,5,0,0,0,0,0,0,0.84,NONE,NONE,NONE,0,183,1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,662.97,12,0.61,0,0,0,0,30.5,0,365.19,61.72,51.6,10.12,31.76,552.47,-404.55,830.03,566.67,46.83,49.5,394.68,303.5,435.35,263.17,532.08,343,297.96,223.67,250.79,184.57,281.29,113.39,73.99,58.17,245.33,320.69,244.67,163.5,134.95,127.5,830.03,566.67,57.06,31.67,19,35.17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,462.67,0,0,0,0,0,0,0,0,8.98,11.83,0,0.64,0.61,0.36,0.39,1.48,0.06,0.07,0,0.16,0.04,0.96,0.43,0.39,0.02,46.72,21.21,33.1,18.53,28.29,381.42,590.17,145.92,97.91,4.84,7.52,76.03,54.23,77.09,47.81,105.16,43.75,65.53,56.28,74.03,61.05,56.33,40.71,33.87,18.86,63.56,45.12,52.43,25.69,50.34,29.42,145.92,97.91,30.42,10.21,29.9,6.76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,193.97,0,0,0,0,0,0,0,0,16.68,22.67,0,0.05,0.03,0.05,0.03,0.26,0.01,0.03,0,0.04,0.03,0.11,0.04,0.05,0.04,2G";
cout<<nn<<endl<<endl;
cout<<std::endl;
vector<string> mm=str_to_vector(nn,',');
for(int j=0;j<mm.size();j++)
cout<<mm[j]<<" ";
cout<<std::endl;
cout<<std::endl;


string bb="			              			   nxxxxxxn        ";
right_clean(bb);
cout<<bb<<endl;
clean(bb);
cout<<bb<<endl;

return 0;

}

